{% extends 'games/base.html' %}
{% load crispy_forms_tags %}
{% block content %}
        <div class="content-section">
            <div class="media">
                <img class="rounded-circle big-profile-img" src="{{ user.profile.image_url }}">
                <div class="media-body">
                    <h2 class="profile-heading">{{ user.username }}</h2>
                    <p>{{ user.email }}</p>
                </div>
            </div>
            <form method="POST">
                {% csrf_token %}
                <fieldset class="form-group">
                    <legend class="border-bottom mb-4">Profile Info</legend>
                    {{ user_form|crispy }}
                    {{ profile_form|crispy }}
                </fieldset>
                <div class="form-group">
                    <button class="btn btn-primary" type="submit">Update</button>
                    <a href="{% url 'games' %}" class="btn btn-secondary">Cancel</a>
                </div>
            </form>
        </div>
{% endblock content %}

{% block extrajs %} 
    <script>sessionStorage.removeItem('currentSession')</script>
{% endblock extrajs %}
